Okay, add this to the bottom of the encounter file, above [Creation] though:

[EncounterFormation]
ship_by_class = 1, 1, sc_capitalbigrandom ;sc_capitalsmallrandom, sc_capitalbigrandom - These two are toggled by the random capital ship option in the script, so use 'em in 'random' spots.
pilot_job = assault_leader_job ;Change to the job. Doesn't really matter, but you should at least match the AI.
make_class = wanderer
formation_by_class = capitals
behavior = wander
arrival = all, -cruise
allow_simultaneous_creation = yes
zone_creation_distance = 0
times_to_create = infinite

Then add this at the very bottom:

permutation = 1, 2

At the moment, only one random capital ship thing per encounter. Although, I think that's all you need. If you want more than one ship to appear, change the 1, 1 to the left of the sc_capitalbigrandom to 2, 2 if you want 2 ships, 3, 3 if you want 3, 12, 12 if you want 12. ;)
